package com.guigu.www.mapper;

import com.guigu.www.pojo.RubricOption;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author DengHao
 * @since 2021-10-21
 */
public interface RubricOptionMapper extends BaseMapper<RubricOption> {
    /*陈显科  根据评估类型的id查询题库选项表  -- 子查询*/
    @Select("SELECT * FROM rubric_option WHERE rub_id IN(\n" +
            "SELECT rub_id FROM rubric WHERE rub_id IN(\n" +
            "SELECT rub_id FROM question_details WHERE ques_id IN(\n" +
            "SELECT ques_id FROM question WHERE ques_id IN(\n" +
            "SELECT ques_id FROM question WHERE ques_test_type=#{rid} AND ques_state=0))))")
    List<RubricOption> SelectOption(int rid);
}
